package bawei.com.adapter;

import android.support.v4.app.Fragment;


import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;



import java.util.ArrayList;

import java.util.List;

/**
 * 类描述:
 * 作者：cwm
 * 时间:2017/3/9 15:55
 * 邮箱:18310832074@163.com
 */

public class MyTabadapter extends FragmentPagerAdapter {

    private String[] strings={
            "直播",
            "推荐",
            "追番",
            "分区",
            "发现"

    };


    private List<Fragment> fragmentList;


    public MyTabadapter(FragmentManager fm,List<Fragment> fragmentList ) {
        super(fm);
        this.fragmentList=fragmentList;
    }

    @Override
    public Fragment getItem(int position) {

        return fragmentList.get(position);


    }

    @Override
    public int getCount() {
        return strings.length;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return strings[position];
    }
}
